package me.ilich.piet.interpreter.commands;

import me.ilich.piet.interpreter.Stack;

public class InCharCommand implements Command {

	@Override
	public void onExecute(Stack.Context context) {
		final Stack.OnInListener listener = context.getOnInListener();
		if(listener==null) throw new NullPointerException("InListener");
		char c = listener.onInChar();
		context.getStackState().getData().add(Integer.valueOf(c));
	}

}
